/*
 * LogisticRegression.h
 *
 *  Created on: 2018��7��29��
 *      Author: jia
 */

#ifndef REGRESSION_LOGISTICREGRESSION_H_
#define REGRESSION_LOGISTICREGRESSION_H_

#include <Regression.h>
#include<LBFGSFramework.h>
#include<Datas.h>
class LogisticRegression: public Regression {
public:
	LogisticRegression();
	virtual ~LogisticRegression();
	static Vec* gra(const Vec& current,Datas* datas,double lamada);
	static double func(const Vec& current,Datas* datas,double lamada);
	virtual void init(){
		Regression::init();
		framework->getGra()->set((Vec* (*)(const Vec&,Datas*,double))&LogisticRegression::gra);
		framework->getFunc()->setF((double (*)(const Vec&,Datas*,double))&LogisticRegression::func);
	}
	virtual Framework* getFramework(){if(framework==NULL){framework=new LBFGSFramework();}return framework;}
};

#endif /* REGRESSION_LOGISTICREGRESSION_H_ */
